package com.zigong.app.beans;

import java.io.Serializable;

import cn.sharesdk.framework.PlatformDb;

/**
 * Created by liuyu on 2017/8/10.
 */

public class SerialThirdInfo implements Serializable {

    private String openAvatar;
    private String openId;
    private String openName;
    private int openType;

    private static final long serialVersionUID = -8058605451055400267L;

    public static SerialThirdInfo from(PlatformDb db,int type){
        if (db!=null){
            SerialThirdInfo sdb=new SerialThirdInfo();
            sdb.setOpenAvatar(db.getUserIcon());
            sdb.setOpenId(db.getUserId());
            sdb.setOpenName(db.getUserName());
            if (type>0) {
                sdb.setOpenType(type);
            }
            return sdb;
        }
        return null;
    }

    public String getOpenAvatar() {
        return openAvatar;
    }

    public void setOpenAvatar(String openAvatar) {
        this.openAvatar = openAvatar;
    }

    public String getOpenId() {
        return openId;
    }

    public void setOpenId(String openId) {
        this.openId = openId;
    }

    public String getOpenName() {
        return openName;
    }

    public void setOpenName(String openName) {
        this.openName = openName;
    }

    public int getOpenType() {
        return openType;
    }

    public void setOpenType(int openType) {
        this.openType = openType;
    }
}
